import http from "@/api/axios";

//获取分页数据
export const getListApi = (data: OutWarehouseReceiptManagement.SearchForm) => {
  return http({
    method: "post",
    url: "/base/biz/outWarehouseDoc/page",
    data
  });
};

//获取tab页数据
export const getPageStaticApi = (data: OutWarehouseReceiptManagement.SearchForm) => {
  return http({
    method: "post",
    url: "/base/biz/outWarehouseDoc/statusCount",
    data
  });
};

//交货
export const deliveryApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: "/base/biz/outWarehouseDoc/delivery",
    data
  });
};

//详情
export const detailsyApi = (id: string) => {
  return http({
    method: "get",
    url: `/base/biz/outWarehouseDoc/outWarehouseDocDetail/${id}`
  });
};

//配置出仓司机
export const setDriverApi = (data: string) => {
  return http({
    method: "post",
    url: `/base/biz/outWarehouseDoc/addOutWarehouseDriver`,
    data
  });
};

//下载出仓单
export const downloadOutWarehouseDocApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: `/export/biz/exportExcel/downloadOutWarehouseDoc`,
    data,
    responseType: "blob"
  });
};

//代理商公司地址下拉
export const getContractSelectListByOutIdApi = (id: string) => {
  return http({
    method: "get",
    url: `/base/bizOutWarehouseBroker/getContractSelectListByOutId/${id}`
  });
};
